#ifndef _SIM_FLASH_H__
#define _SIM_FLASH_H__
#include <stdio.h>
typedef struct {
	FILE* fp;
	int bkSize;
	const char* fileName;
}*PFlash, Flash;

int CreateFlash(PFlash pf, const char* fpName, int bkSize, int bkNum);
int WriteFlashBK(PFlash pf, int bkInx, int bkSize, unsigned char* cache, int bkNum);
int EraseFlashBK(PFlash pf, int bkInx, int bkNum);
int ReadFlashBK(PFlash pf, int bkInx, int bkSize, unsigned char* cache, int bkNum);

#endif